Skip to content

4.0 mt#99

Open
RobbinBouwmeester wants to merge 4 commits intorelease/4.0from
4.0_MT
Open

4.0 mt#99
RobbinBouwmeester wants to merge 4 commits intorelease/4.0from
4.0_MT

Conversation

@RobbinBouwmeester
Copy link
Copy Markdown
Member

Add multitask functionality.

RobbinBouwmeester and others added 4 commits April 2, 2026 20:05
… to _architecture and register legacy module shim

The bundled multitask_model.pt was serialised when MultitaskDeepLCModel and
BatchedHeads lived in a top-level module called `multitask_model`.  That
module no longer exists, so torch.load raised ModuleNotFoundError for any
user who tried to load the default model.

Fix:
- Add BatchedHeads and MultitaskDeepLCModel to deeplc/_architecture.py,
  where the rest of the model architecture already lives.
- Add _patch_legacy_multitask_module() to deeplc/_model_ops.py, which
  registers a sys.modules shim mapping the old import path to the new
  classes before torch.load is called.  The shim is a no-op if the
  module is already registered.
- Add test_load_multitask_model_without_prior_shim to tests/test_model_ops.py
  to prevent regression.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Fix multitask_model.pt loading (ModuleNotFoundError on import)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant